package com.fiume.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fiume.mapper.CheckitemMapper;
import com.fiume.pojo.Checkitem;
import com.fiume.service.CheckitemService;
import com.fiume.support.PageResult;
import com.fiume.support.QueryPageBean;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * \* Created with IntelliJ IDEA.
 * \* @author: fanfan
 * \* Date: 2020/12/28
 * \* Time: 20:01
 * \* To change this template use File | Settings | File Templates.
 * \* Description:
 * \
 */
@DubboService
public class CheckitemServiceImpl extends ServiceImpl<CheckitemMapper, Checkitem> implements CheckitemService {
    @Override
    public PageResult findByPage(QueryPageBean queryPageBean) {
        IPage<Checkitem> result = this.page(new Page<Checkitem>(queryPageBean.getCurrentPage(), queryPageBean.getPageSize()));

        //将记录总数和当前查询结果返回
        return new PageResult(result.getTotal(),result.getRecords());
      }
}
